<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script type="text/javascript" src="/fuman/js/order.js"></script>
<script>
function addorder()
{
	$('#addstorageform').modal('show');	
}
function setOrderState(){
	var str = selectallpro();
	if(str !=false){
		if(confirm("确定设置选中订单为配货中状态吗？")){
			 $.post("/deliverorder/ajaxbutton", {"op": "dodistribution","str":str},
                    function(data){
                        //alert(data);return false;
                        if(data==200)
                        {
                           location.reload();
                        }
                    },"json");
		   }
	}else{
		//alert('请先选择要设置成配货中的订单');
	}
}
</script>
<title>UPS交运列表</title>
<body class="withvernav">
<div class="bodywrapper"> {{include file='/public/leftmenu.tpl'}}
  <div class="centercontent">
    <div class="pageheader notab">
      <h1 class="pagetitle">UPS交运列表</h1>
      <span class="pagedesc"></span>
       <div class="menulist">
        <ul class="profile_summary">
          <li><a href="/doit/ajaxbutton?op=upsexpress"  target="_blank"><span>UPS批量交运</span></a></li>
        </ul>
      </div>
    </div>
    <!--pageheader-->
    
    <div id="contentwrapper" class="contentwrapper">
      <div id="basicform" class="subcontent">
          <!--搜索栏-->
          <div style="float:left"> 
          {{if $userid==133 || $userid==295 || $userid==365 || $userid==345}}
          <button class="stdbtn btn_red" onClick="outexpressexcel('ups')">导出今日发货列表</button>
          {{/if}}
          </div>
           <div class="page">{{$pageList}} 计{{$total}}条记录，共{{$totalpage}}页</div>
    <form class="stdform stdform2" method="get" action="/order/sfexpress/{{$orderType}}">
    <input type="hidden" name="orderType" id="orderType" value="{{$orderType}}" >
      <div class="tableoptions"> 交运时间：
       <input type="text"  name="starttime" value="{{$starttime}} " onClick="WdatePicker({dateFmt:'yyyy-MM-dd '})" class="width100 hasDatepicker" /> - <input type="text"  name="endtime" value="{{$endtime}} " onClick="WdatePicker({dateFmt:'yyyy-MM-dd '})" class="width100 hasDatepicker" />
       关键词: <input type="text" name="other" id="other" class="width100" value="{{$other}}" placeholder="订单号或运单号" />
       &nbsp;
      订单状态:
                           <select name="statusst" class="selection" style="width:100px;">
                            <option value=""  selected>请选择</option>
                                <option value="1" {{if $statusst==1}} selected{{/if}}>已支付</option>
                                <option value="2" {{if $statusst==2}} selected{{/if}}>配货中</option>
                                <option value="3" {{if $statusst==3}} selected{{/if}}>已完成</option>
                            </select>
                            
        <select name="isexe" class="selection" style="width:100px;">
                <option value=""  selected>交运状态</option>
                    <option value="1" {{if $isexe==1}} selected{{/if}}>交运成功</option>
                    <option value="2" {{if $isexe==2}} selected{{/if}}>交运失败</option>
                    <option value="3" {{if $isexe==3}} selected{{/if}}>未交运</option>
                </select>
               
&nbsp;
        <button class="btn btn_orange btn_search radius50">Search</button>
         &nbsp;  &nbsp; 
         <a href="?isexe=1">{{if $isexe==1}}<font color="red">交运成功</font>{{else}}交运成功{{/if}}</a>
        &nbsp;  &nbsp;
         <a href="?isexe=2">{{if $isexe==2}}<font color="red">交运失败</font>{{else}}交运失败{{/if}}</a>
         &nbsp;  &nbsp;
    	 <a href="?isexe=3">{{if $isexe==3}}<font color="red">未交运</font>{{else}}未交运{{/if}}</a>
        &nbsp;  &nbsp;&nbsp;  &nbsp;&nbsp;  &nbsp;
        <a href="javascript:void(0)" onClick="moreopenMailNoUrl(1,{{$orderType}})" class="btn btn2 btn_help"><span>打印标签</span></a>
        &nbsp;&nbsp;
        <a href="javascript:void(0)" onClick="moreopenMailNoUrl(2,{{$orderType}})" class="btn btn2 btn_help"><span>打印发票</span></a>
        &nbsp;  &nbsp;&nbsp;  &nbsp;&nbsp;  &nbsp;
        <a href="javascript:void(0)" onClick="setOrderState()" class="btn btn2 btn_help"><span>标配货</span></a>
         &nbsp;&nbsp; &nbsp;&nbsp;
         <a href="javascript:void(0)" onClick="repeatexpress(2)" class="btn btn2 btn_help"><span>重新交运</span></a>
      </div>
    </form>
    <!--搜索栏结束-->

             <table cellpadding="0" cellspacing="0" border="0" class="stdtable">
          
            <thead>
              <tr>
               <th class="head0"><input name="allchk" id="allchk" type="checkbox" onClick="allSelect('ppid[]')"></th>
                <th class="head1">订单号</th>
                <th class="head1">状态</th>
                <th class="head1">客户名称</th>
                <th class="head1">来源平台</th>
                <th class="head1">国家</th>
                <th class="head1">操作人</th>
                <th class="head1">状态</th>
                <th class="head1">运单号</th>
                 <th class="head1">交运时间</th>
                 <th class="head1">操作</th>
           
              </tr>
            </thead>
          
             {{foreach from=$orderlist item=detail key=key}}
                <tr>
                 <td><input name="ppid[]" type="checkbox" value="{{$detail.id}}"></td>

                <td><a href="/orderlist/orderlist?kw={{$detail.orderID}}" target="_blank">{{$detail.orderID}}</a></td>
                <td>{{$detail.statusst}}</td>
                <td>{{$detail.customerid}}</td>
                <td>{{$detail.customertype}}</td>
                <td>{{$detail.customerqq}}</td>
                <td>{{$detail.createUser}}</td>
                <td>{{if $detail.isexe==1}}交运完成{{/if}}{{if $detail.isexe==2}}交运失败{{/if}}{{if $detail.isexe==0}}未交运{{/if}}</td>
                <td width="200">{{if $detail.isexe==1}}{{$detail.mailNo}}{{/if}}{{if $detail.isexe==2}}{{$detail.exememo}}{{/if}}{{if $detail.isexe==0}}{{$detail.exememo}}{{/if}}</td>
                <td>{{$detail.mailinstime}}</td>

                <td> {{if $detail.isexe==2}}<a href="javascript:void(0)" onClick="delone({{$detail.id}},'delsfexpress')">删除</a>{{/if}} 
                     {{if $detail.isexe==0}}<a href="javascript:void(0)" onClick="delone({{$detail.id}},'delsfexpress')" >删除</a>{{/if}}
                
                 {{if $managers || in_array('101',$showpower)}}{{if $detail.isexe==1}}<a href="javascript:void(0)" onClick="delone({{$detail.id}},'delsfexpress')" >删除</a> | {{/if}}{{/if}}
                {{if $detail.isexe==1}}<a href="/{{$detail.invoiceUrl}}" target="_blank">发票</a>{{/if}}
                
                
                </td>
                </tr>
              {{/foreach}}
            
            
            
          </table>
          
           <div class="page">{{$pageList}} 计{{$total}}条记录，共{{$totalpage}}页</div>
         </div></div>
<!-- 模态框（Modal）添加商品属性 -->
<form action="/datareport/ajaxbutton?op=savemabangorder"  method="post" name="attributeform" id="attributeform" >
  <div class="modal fade" id="addstorageform" tabindex="-1" role="dialog" aria-labelledby="returnaddattributeform" aria-hidden="true">
    <div class="modal-dialog" style="width:740px;">
      <div class="modal-content">
        <div class="modal-header">
          <button type="button" class="close" data-dismiss="modal" 
               aria-hidden="true">× </button>
          <h4 class="modal-title" id="returnaddattributeform"> 添加马帮订单 </h4>
        </div>
        <div class="modal-body">
          <table width="100%" border="0" cellspacing="0" cellpadding="0">
            <tr>
              <td width="100">马帮订单号： </td>
              <td align="left"><textarea name="orderlist" id="orderlistst" cols="10" rows="10"></textarea></td>
            </tr>
          
             <tr>
              <td>注意： </td>
              <td align="left">一行一个订单号</td>
            </tr>
          </table>
          <div class="modal-footer">
            <button type="button" class="btn btn-default" 
               data-dismiss="modal"> 关闭 </button>
            <button type="button" class="btn btn-primary"  onclick="AWSsubmit('attributeform','addstorageform')"> 提交 </button>
          </div>
        </div>
        <!-- /.modal-content --> 
      </div>
      <!-- /.modal-dialog --> 
    </div>
  </div>
  <!-- /.modal -->
</form>
<div id="goToTop" style="display:none"><a href="javascript:;">TOP</a></div>
</body>
</html>